﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using GH.BLL;
using System.Data;

namespace GH.Web.Welfare
{
    public partial class MutualMemberSumirisePrint : System.Web.UI.Page
    {
        public static string UnitRoot = System.Configuration.ConfigurationSettings.AppSettings["UnitRoot"];
        #region 画面初始化

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                MutualMember bllMutualMember = new MutualMember();
                string strWhere = "  1=1";
                if (Request.QueryString["RightsFlg"].ToString() == "Search")
                {
                    string theUnionID = Request["theUnoinID"].ToString();
                    string theName = Request["theName"].ToString();

                    if (theUnionID != "0")
                    {
                        strWhere += " AND  互助员工统计表.单位=" + theUnionID;
                    }
                    if (theName.Trim().Length > 0)
                    {
                        strWhere += " AND  互助员工统计表.姓名 like '%" + theName.Trim() + "%'";
                    }
                }
                else if (Request.QueryString["RightsFlg"].ToString() == "SELECT")
                {
                    strWhere += " AND  互助员工统计表.单位=" + this.Session["UnionSelect"].ToString();
                }
                DataSet dsRecord = bllMutualMember.GetList(strWhere);
                rptList.DataSource = dsRecord;
                rptList.DataBind();
                //SetDataInit(strWhere);
            }

        }

        #endregion 画面初始化
    }
}
